//显示Loading
export function showLoading(obj : any = {}) {
    let { title = "加载中...", mask = false } = obj;
    uni.showLoading({
        title: title,
        mask: mask
    });
};
//显示提示
export function showToast(obj : any = {}) {
    let { title, icon = "none" } = obj;
    uni.showToast({
        title: title,
        icon: icon
    });
};
//显示弹窗
export function showModal(obj : any = {}) {
    let { title = "", content = "", showCancel = true, success } = obj;
    uni.showModal({
        title: title,
        content: content,
        showCancel: showCancel,
        success: success
    });
};
//页面跳转
export function navigateTo(obj : any = {}) {
    let { url = "" } = obj;
    uni.navigateTo({
        url: url
    });
};
//页面跳转
export function reLaunch(obj : any = {}) {
    let { url = "" } = obj;
    uni.reLaunch({
        url: url
    });
};
//小程序跳转
export function navigateToMiniProgram(obj : any = {}) {
    let { appId = "", url = "" } = obj;
    uni.navigateToMiniProgram({
        appId: appId,
        url: url
    });
};
//拨打电话
export function makePhoneCall(obj : any = {}) {
    let { phone = "" } = obj;
    uni.makePhoneCall({
        phoneNumber: phone
    });
};
//设置状态栏标题
export function setNavigationBarTitle(obj : any = {}) {
    let { title = "" } = obj;
    uni.setNavigationBarTitle({
        title: title
    });
};
//返回
export function navigateBack(obj : any = {}) {
    let { fail } = obj;
    uni.navigateBack({
        fail: fail
    });
};
//下载图片
export function getImageInfo(obj : any = {}) {
    let { src = "", success, complete } = obj;
    uni.getImageInfo({
        src: src,
        success: success,
        complete: complete
    });
};
//保存图片
export function saveImageToPhotosAlbum(obj : any = {}) {
    let { filePath = "", success, fail } = obj;
    uni.saveImageToPhotosAlbum({
        filePath: filePath,
        success: success,
        fail: fail
    });
};
//打开授权
export function openSetting(obj : any = {}) {
    let { success } = obj;
    uni.openSetting({
        success: success
    });
};